package com.stedu.service;

import com.stedu.bean.Book;
import com.stedu.bean.Classify;
import com.stedu.bean.ClassifyWithBookCount;
import com.stedu.exception.SteduException;

import java.util.List;

public interface ClassifyService {
    //添加分类
    boolean insertClassify(Classify classify) throws SteduException;

    boolean deleteClassify(Integer cid);

    boolean updateClassify(Classify classify);

    //根据分类名查询
    Classify selectCname(String cname);

    //查询所有
    List<Book> selectAll();

    ClassifyWithBookCount selectByIdAndName(Integer cid, String cname);

    // 根据 bid 查询书籍及其分类
    Classify selectBookWithClassifies(String cname);
}
